﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace GoogleAppsTools
{
    // this class just wraps some Win32 stuffthat we're going to use
    internal class NativeMethods
    {
        public const int HWND_BROADCAST = 0xffff;
        public static readonly int SHOW_SETTINGS = RegisterWindowMessage("SHOW_SETTINGS");
        public static readonly int CHECK_NEW_MAIL = RegisterWindowMessage("CHECK_NEW_MAIL");
        public static readonly int NEW_EVENT = RegisterWindowMessage("NEW_EVENT");
        public static readonly int OPEN_CALENDAR = RegisterWindowMessage("OPEN_CALENDAR");
        [DllImport("user32")]
        public static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam);
        [DllImport("user32")]
        public static extern int RegisterWindowMessage(string message);
    }
}
